package interfaces;

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.ArrayList;

public interface ServerInterface extends Remote {

    public boolean login(String username, String password) throws RemoteException;

    public void addListener(ListenerInterface listener) throws RemoteException;

    public void removeListener(ListenerInterface listener) throws RemoteException;

    public int opretOrdre(String firma) throws RemoteException;

    public void tilføjVareTilOrdre(int OrdreId, String varenavn, String varegruppeNavn, double pris, int antal) throws RemoteException;

    public ArrayList<VareInterface> rabatCheck(String firmanavn, String varegruppenavn) throws RemoteException;

    public ArrayList<VareInterface> hentVarer(String firma, String varegruppeNavn) throws RemoteException;

    public ArrayList<VaregruppeInterface> getVaregrupper() throws RemoteException;

    public ArrayList<VareInterface> hentRabatVare(String firmanavn) throws RemoteException;

    public void betalOrdre(int ordreId, String firmanavn) throws RemoteException;

    public void ordreModtaget(int ordreId, String firmanavn) throws RemoteException;

    public ArrayList<OrdreInterface> ikkeBetalteOrdre(String firmanavn) throws RemoteException;

    public ArrayList<OrdreInterface> ikkeModtagedeOrdre(String firmanavn) throws RemoteException;

    public double hentFirmaTotalBalance(String firmanavn) throws RemoteException;

    public FirmaInterface hentFirma(String username) throws RemoteException;

    public ArrayList<OrdreInterface> hentAlleOrdre(String firmaname) throws RemoteException;

    public ArrayList<OrdreInterface> hentIkkeBetalteOrdre(String firmaname) throws RemoteException;

    public void lockStart(String varenavn, String varegruppeNavn) throws RemoteException;
    
    public OrdreInterface hentFuldOrdre( String firmanavn, int ordreid ) throws RemoteException;

    public void lockEnd() throws RemoteException;

    public void rollback() throws RemoteException;
}
